/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;

import models.Usuario;
import play.mvc.Before;
import play.mvc.Controller;
import play.mvc.With;

/**
 *
 * @author luramirez
 */
@With(Secure.class)
public class Admin extends Controller{
    
    @Before
    public static void setConnectedUser(){
        if(Security.isConnected()){
            Usuario user = Usuario.find("byUsuario", Security.connected()).first();
            renderArgs.put("user", user.nombre);
        }
    }
    
    
    public static void index(){
        Home.index();
    }
}
